package com.tieland.xunda.common.util;

/**
 * User: qiukx
 * Date: 2008-7-15
 * Company: tieland
 * Description:
 */
public class StringUtil {
    public static boolean isNullOrEmpty(Object obj){
        boolean flag = false;
        if (obj == null) {
            flag = true;
        } else {
            if(obj instanceof String){
                String s = (String) obj;
                if("".equals(s)) flag = true;
            }else{
                flag = false;
            }
        }
        return flag;
    }

    public static boolean isNotNullOrEmpty(Object obj){
        return !isNullOrEmpty(obj);
    }

    public static String getStringSubMethod(String x,String y){
        int result = Integer.parseInt(y)-Integer.parseInt(x);
        return String.valueOf(result);
    }
}
